package cn.udrm.water.base.v1.manager.dto;

import java.util.List;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import cn.udrm.water.base.v1.manager.entities.BasePerson;

@Mapper(componentModel="spring")
public interface BasePersonDtoMapper {
	
	@Mappings({
		@Mapping(source="department.id", target="departmentGuid"),
		@Mapping(source="department.name", target="departmentName")
	})
	public BasePersonDto from(BasePerson person);
	public BasePerson to(BasePersonDto personDto);
	
	public List<BasePersonDto> from(List<BasePerson> persons);

}
